<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>店铺修改页面</title>
<meta name="renderer" content="webkit">	
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">	
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">	
	<meta name="apple-mobile-web-app-status-bar-style" content="black">	
	<meta name="apple-mobile-web-app-capable" content="yes">	
	<meta name="format-detection" content="telephone=no">	
	<link rel="stylesheet" type="text/css" href="/bsc/static/common/layui/css/layui.css" media="all">
	<link rel="stylesheet" type="text/css" href="/bsc/static/common/bootstrap/css/bootstrap.css" media="all">
	<link rel="stylesheet" type="text/css" href="/bsc/static/common/global.css" media="all">
	<link rel="stylesheet" type="text/css" href="/bsc/static/css/personal.css" media="all">
<script type="text/javascript" src="/bsc/static/js/jquery-1.7.1.js"></script>
<script type="text/javascript">
$(function(){
	  //下拉框定值
	  $("#shopuserid").val(${bs.owner_id}); 
	$("#show_status").val(${bs.show_status}); 
});
function op(){
	  document.forms[0].action="/bsc/shop/re";
	  document.forms[0].submit();
}
function PreviewImage(imgFile) {
    var path = window.URL.createObjectURL(imgFile.files[0]);
    document.getElementById("image").src=  path ;
}
</script>
</head>
<body> 
<form method="post" action="/bsc/shop/insertshop" enctype="multipart/form-data"> 
<input type="hidden" name="shop_id" value="${bs.shop_id }" >  
<table border="1"  class="table table-bordered">
<tr>
<td>店主账号:</td> <td ><select class="form-control" name="bsu.shop_user_id" id="shopuserid" >
 <c:forEach items="${list }" var="user" >
  <option value="${user.shop_user_id }">${user.account }</option>
 </c:forEach>
</select> </td>
<td>状态:</td> <td >
<select class="form-control" name="show_status" id="show_status" >
<option value="0">停用</option>
<option value="1">启用</option>
</select>
</td>
</tr>
<tr>
<td>店铺名称:</td> <td ><input class="form-control" type="text" name="shop_name" value="${bs.shop_name }"></td>
<td>店铺简称:</td> <td ><input class="form-control" type="text" name="short_name" value="${bs.short_name }"></td>
</tr>
<tr>
<td>店铺封面图:</td> <td >
<input type="file" name="file" class="form-control" onchange="PreviewImage(this)">
<input type="hidden" name="photoname" value="${bs.shop_detail_image }" />
  <img alt="" src="/bsc${bs.shop_detail_image }" width="200" height="70" id="image"> <br>
</td>
<td>营业执照号:</td> <td ><input class="form-control" type="text" name="shop_license" value="${bs.shop_license }"></td>
</tr>
<tr>
<td>店铺面积:</td> <td ><input class="form-control" type="text" name="shop_area"  value="${bs.shop_area }"></td>
<td>主营项目:</td> <td ><input class="form-control" type="text" name="shop_project" value="${bs.shop_project }"></td>
</tr>
<tr>
<td>店铺电话:</td> <td ><input class="form-control" type="text" name="shop_phone" value="${bs.shop_phone }"></td>
<td>店铺地址:</td> <td ><input class="form-control" type="text" name="shop_address" value="${bs.shop_address   }"></td>
</tr>
</table>
<div align="right" style=" padding-right:130px ; padding-top:10px ;">
<input type="button" class="btn btn-info" style="width: 80px ;height: 30px " value="返回" onclick="op()">
<input type="submit" class="btn btn-info" style="width: 80px ;height: 30px " value="保  存">
</div>
</form>
</body>
</html>